﻿using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace SmartParkingServer.Models
{
    [Table("system_users")]
    public class UserModel
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [Column(name: "user_id")]
        public int UserId { get; set; }
        [Column(name: "user_name")]
        public string UserName { get; set; }
        [Column(name: "password")]
        public string Password { get; set; }
        [Column(name: "user_icon")]
        public string UserIcon { get; set; }
        [Column("real_name")]
        public string RealName { get; set; }
        [Column(name: "age")]
        public int Age { get; set; }

        [DefaultValue(1)]
        public int state { get; set; }

        [NotMapped]//不映射到数据库
        public string Token { get; set; }
    }
}
